 var store_names=new Array();
 var store_ids=new Array();
 var userId="";
 var userName="";   
function addMem(){
		var vk = $('#OneDataId').text();
		console.log("cy--addLmenber.js:"+vk);
		$('.fL_add').attr("department_id",vk);
		addlm();
	}
function addlm(){
	/* 添加成员 */

		//$('#h4').text('成员变更');
		//var department_id=$('.fL_add').attr('department_id');
		//alert(1+department_id)
		$('#de_name_li').attr('style','display:none');
		$('#de_des_li').attr('style','display:none');
		$('#add_manger_li').attr('style','display:blcok');
		$('#de_member_li').attr('style','display:blcok');
		$('.delete_md_detail').remove();
		//$('#de_manager_name_edit').empty();
		//$('#de_member_edit').empty();
		//$('#de_manager_name_edit').removeAttr("userId");
		//$('#de_manager_name_edit').removeAttr("userName");
		//alert();
		//$('#de_manager_name_edit').val("");
		//$('#de_member_edit').val("");
		//$('#de_member_edit').removeAttr("userId");
		//$('#de_member_edit').removeAttr("userName");		
		selectLeaderLM();
		$('#s_popup_add').show();
        $('#issue_add').show();
        //alert(111111111);
        
	
}

function selectLeaderLM(){
	var department_id=$('.fL_add').attr('department_id');
	console.log(2222+"进入查询LeaderLM");
	//alert("department_id"+department_id);
	console.log("department_id:::::"+department_id);
	$.post(path+'/api/department/selectML', {    		
			"department_id":department_id
	}, function(data) {
		//alert("进入selectLeaderLM方法");undefined
		console.log("进入selectLeaderLM方法");
		if(data.leadInfo.leaderName==null||data.leadInfo.leaderName==""){
			$('#de_manager_name_edit').empty();
		}else{
			userName=data.leadInfo.leaderName;
			userId=data.leadInfo.sid;
			var html='<li id="store_line_l"  class="delete_md_detail" cid="'+userName+'" >'+userName+'<img  mid="'+userName+'" id="delete_store_l" src="../sys/set/images/close.png" class="x_lista"></li>';
			$('#de_manager_name_edit').html(html);
		}				
		console.log("userName"+userName+"userId"+userId);
		store_names.length=0;
		store_ids.length=0;
		if(data.memInfo==null||data.memInfo==""){
			$('#de_member_edit').empty();			
		}else{
			$.each(data.memInfo,function(i,d){
				console.log(d.name);
				store_names[i]=d.name;
				store_ids[i]=d.id;
		    })
		    var html='';
			for(var i in store_names){
				html += '<li id="store_line'+i+'" indexNum="'+i+'" class="delete_md_detail" cid="'+store_names[i]+'" >'+store_names[i]+'<img indexNum="'+i+'" mid="'+store_names[i]+'" id="delete_store" src="../sys/set/images/close.png" class="x_lista"></li>';
			}
			$('#de_member_edit').html(html);
			
		}
		
	    //alert(str);		
	    //$('#de_member_edit').val(str).attr("readonly",true);
		//$('#de_member_edit').val("11111").attr("readonly",true);
	});
}